from glob import *
import os
from os.path import *
import sys
from PyQt4 import QtCore, QtGui, QtCore

class Converter:
	"""
	model for launching mzWiff
	"""

	def __init__(self):
		"""
		constructor
		"""
		self.CMD=normcase("config/mzWiff.exe")
		self.DEFAULT_OPT=["--Analyst", "--mzXML"]


	def StudyInput(self,expression):
		if "," in expression:
				result=expression.split(",")
				for exp in result:
						if "-" in exp:
								result=exp.split("-")
				return [key for key in xrange (result[0],result[1])] + result
		if "-" in expression:
				result=expression.split("-")
				return [key for key in xrange (result[0],result[1])]
		return expression


